<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>
    <script>
        var user = {
            account: "abc",
            pwd: "123456",
            gender: "男",
            isVip: false,
            age: 18
        };

        // console.log(user, typeof user);
        // 输出对象的账号
        // console.log(user.account, typeof user.account);
        // 输出对象的年龄
        console.log(user.age, typeof user.age);

        console.log(user.sex, typeof user.sex);

        var user2;

        console.log(user2.account);
    </script>
</body>

</html>